"""
@Project:xiaomishop
@File:serializer.py
@Author:马可
@Date:上午 11:27
"""

from rest_framework.serializers import ModelSerializer

from .models import Carousel, Goods, Category, GoodImg, GoodCollect


class CarouselSer(ModelSerializer):
    class Meta:
        model = Carousel
        fields = '__all__'


class GoodsSer(ModelSerializer):
    class Meta:
        model = Goods
        fields = '__all__'


class CateSer(ModelSerializer):
    class Meta:
        model = Category
        fields = '__all__'


# 获取商品图片序列化器
class GoodImgSer(ModelSerializer):
    class Meta:
        model = GoodImg
        fields = '__all__'

# 收藏
class GoodC(ModelSerializer):
    class Meta:
        model = GoodImg
        fields = '__all__'

# 获取收藏
class GoodCollectSer(ModelSerializer):
    class Meta:
        model = GoodCollect
        fields = '__all__'